package cn.funcat.map.tile
{
	import cn.funcat.map.layer.bound.Eds2DBound;



	/****
	 * 如果需要改变城市, 修改这两个类就可以了.
	 * 首先要找到url pattern.
	 * 在这个里面拼装
	 * 
	 */ 	
	public class Eds2DTileContext extends TileContextBase
	{
		
		public function Eds2DTileContext(){
			super();
			
			this._bound = new Eds2DBound();
		}
		
		override public function getTileURL(x:Number, y:Number, z:Number):String{
			//目前是合肥市的范围, 不适用于其他城市.
			 if(!inBound(x, y, z)){
				//return FunCatConsts.BASE_URL + FunCatConsts.BLANK_TILE;
				return "http://2dpic.edushi.com/hefei/0/132,55.jpg";//Blank pic
			}
			
			/* return FunCatConsts.BASE_URL + FunCatConsts.TWO_D_ADDR + z.toString() + "/" + x.toString() + "," +
				y.toString() + ".jpg"; */
			
			//合肥的
			return "http://2dpic.edushi.com/hefei/" + (z-1).toString() +"/"+ x.toString()
				+ "," + y.toString() + ".jpg";
			//上海: http://2p193174.2dpic.edushi.com:10013/cn/shanghai/shanghai/0/193,174.jpg
			//return "http://2p193174.2dpic.edushi.com:10013/cn/shanghai/shanghai/" + (z-1).toString() +"/"+ x.toString()
			//	+ "," + y.toString() + ".jpg";
		}
	}
	
	
}